{deps, [{fast_yaml, {git, "https://github.com/processone/fast_yaml.git", {branch, "master"}}},
        {yval, {git, "https://github.com/zinid/yval.git", {branch, "master"}}}]}.

{erl_opts,
 [{platform_define, "^21\.[0-2]\.", old_set_env},
  debug_info,
  warn_export_all,
  warn_export_vars,
  warn_missing_spec,
  warn_untyped_record,
  warn_unused_record,
  warn_bif_clash,
  warn_obsolete_guard,
  warn_unused_vars,
  warn_shadow_vars,
  warn_unused_import,
  warn_unused_function,
  warn_deprecated_function]}.

{xref_checks,
 [undefined_function_calls,
  undefined_functions,
  locals_not_used,
  deprecated_function_calls,
  deprecated_functions]}.

{dialyzer,
 [{warnings,
   [
    unmatched_returns,
    error_handling,
    race_conditions,
    unknown
   ]}
 ]}.

{elvis_output_format, plain}.

{elvis,
 [#{dirs => ["."],
    filter => "rebar.config",
    rules =>
        [{elvis_style, line_length, #{limit => 100, skip_comments => false}},
         {elvis_style, no_tabs},
         {elvis_style, no_trailing_whitespace}]},
  #{dirs => ["src"],
    filter => "*.erl",
    rules =>
        [{elvis_style, line_length, #{limit => 100, skip_comments => false}},
         {elvis_style, no_tabs},
         {elvis_style, no_trailing_whitespace},
         {elvis_style, macro_module_names},
         {elvis_style, operator_spaces, #{rules => [{right, ","}, {right, "++"}, {left, "++"}]}},
         {elvis_style, nesting_level, #{level => 5}},
         {elvis_style, god_modules, #{limit => 30}},
         {elvis_style, no_if_expression},
         {elvis_style, no_nested_try_catch},
         {elvis_style, used_ignored_variable},
         {elvis_style, no_behavior_info},
         {elvis_style, module_naming_convention, #{regex => "^([a-z][a-z0-9]*_?)*(_SUITE)?$"}},
         {elvis_style, function_naming_convention, #{regex => "^[a-z][a-z0-9_]*$"}},
         {elvis_style, state_record_and_type},
         {elvis_style, no_spec_with_records},
         {elvis_style, dont_repeat_yourself, #{min_complexity => 20}},
         {elvis_style, no_debug_call, #{ignore => []}},
         {elvis_style, no_common_caveats_call}]},
  #{dirs => ["src"],
    filter => "*.app.src",
    rules =>
        [{elvis_style, line_length, #{limit => 100, skip_comments => false}},
         {elvis_style, no_tabs},
         {elvis_style, no_trailing_whitespace}]},
  #{dirs => ["."],
    filter => "Makefile",
    ruleset => makefiles}
 ]}.

{profiles,
 [{test,
   [{erl_opts, [nowarn_export_all,
                nowarn_missing_spec]}
   ]},
  {lint,
   [{plugins,
     [{rebar3_lint, "0.1.10"}]}
   ]}
 ]}.

%% Local Variables:
%% mode: erlang
%% End:
%% vim: set filetype=erlang tabstop=8:
